package com.amigo.online.provider.sync.handle.data.redis.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import com.amigo.online.common.param.result.VideoInfo;
import com.amigo.online.provider.common.RedisKey;
import com.amigo.online.provider.sync.common.AbstractGlobalService;
import com.amigo.online.provider.sync.handle.data.redis.service.VideoRedisService;


@Service
public class VideoRedisServiceImpl extends AbstractGlobalService implements VideoRedisService {

    @Autowired
    RedisTemplate<String, Object> redisTemplate;

    @Override
    public void insertObject(VideoInfo newData) {
        //  Auto-generated method stub

    }

    @Override
    public long updateObject(Long query, Long update) {
        Long result = redisTemplate.opsForHash().delete(RedisKey.VIDEO_REDIS_ID_KEY, query);
        return result;
    }

    @Override
    public long deleteObject(Long query) {
        //  Auto-generated method stub
        return 0;
    }

}
